package com.my.screenadapter.sql;

import android.database.MatrixCursor;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.my.screenadapter.Base.BaseActivity;
import com.my.screenadapter.R;

public class CursorActivity extends BaseActivity {


    @Override
    protected void init() {

    }

    @Override
    protected int initLayoutId() {
        return R.layout.activity_cursor;
    }

    public void foreachCursor(View view) {
        String[] columns = new String[]{"resultTitle，abc"};
        MatrixCursor cursor = new MatrixCursor(columns);

        cursor.addRow(CursorUtil.getObjectData("true","abc"));
        cursor.addRow(CursorUtil.getObjectData("true","defg"));
        cursor.addRow(CursorUtil.getObjectData("false","00000"));
        CursorUtil.foreachCursor(cursor);
        CursorUtil.foreachCursor(cursor);

        cursor =null;
        CursorUtil.foreachCursor(cursor);
    }
}
